package com.wx.chapter8.homework08;

/**
 * ClassName:BankAccount
 * Package :com.wx.chapter8.homework08
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/5/29 - 17:22
 */
public class BankAccount {
    private double balance;//余额

    //存款
    public void deposit(double amount) {
        balance += amount;
    }

    //取款
    public void withdraw(double amount) {
        balance -= amount;
    }

    public BankAccount(int balance) {
        this.balance = balance;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }
}
